package org.wiztools.thegreatwall;

import java.sql.Date;

/**
 *
 * @author subwiz
 */
public class Post {

    private Integer userId;
    private String userName;
    private Integer wallId;
    private String wallName;
    private String message;
    private Date date;

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getWallId() {
        return wallId;
    }

    public void setWallId(Integer wallId) {
        this.wallId = wallId;
    }

    public String getWallName() {
        return wallName;
    }

    public void setWallName(String wallName) {
        this.wallName = wallName;
    }
            
    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Post other = (Post) obj;
        if ((this.userId == null) ? (other.userId != null) : !this.userId.equals(other.userId)) {
            return false;
        }
        if ((this.userName == null) ? (other.userName != null) : !this.userName.equals(other.userName)) {
            return false;
        }
        if ((this.wallId == null) ? (other.wallId != null) : !this.wallId.equals(other.wallId)) {
            return false;
        }
        if ((this.wallName == null) ? (other.wallName != null) : !this.wallName.equals(other.wallName)) {
            return false;
        }
        if ((this.message == null) ? (other.message != null) : !this.message.equals(other.message)) {
            return false;
        }
        if ((this.date == null) ? (other.date != null) : !this.date.equals(other.date)) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 13 * hash + (this.userId != null ? this.userId.hashCode() : 0);
        hash = 13 * hash + (this.userName != null ? this.userName.hashCode() : 0);
        hash = 13 * hash + (this.wallId != null ? this.wallId.hashCode() : 0);
        hash = 13 * hash + (this.wallName != null ? this.wallName.hashCode() : 0);
        hash = 13 * hash + (this.message != null ? this.message.hashCode() : 0);
        hash = 13 * hash + (this.date != null ? this.date.hashCode() : 0);
        return hash;
    }

    @Override
    public String toString() {
        return "[" 
                + userId + ", "
                + userName + ", "
                + wallId + ", " 
                + wallName + ", "
                + message + ", "
                + date
                + "]";
    }

}
